home *** CD-ROM | disk | FTP | other *** search
/ QRZ! Ham Radio 3 / QRZ Ham Radio Callsign Database - Volume 3.iso / world / mac / theory_a / nvchmtst.hqx / Novice Ham Test / background_2707.txt < prev    next >
Text File  |  1994-05-12  |  10KB  |  438 lines

  1. -- background: 2707 from stack: in
  2. -- bmap block id: 3605
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: Test
  6. ----- HyperTalk script -----
  7. On openCard
  8.   global questans, questkey, rightone, group
  9.   hide background button "Correct!"
  10.   hide field review
  11.   set hilight of background button A to false
  12.   set hilight of background button B to false
  13.   set hilight of background button C to false
  14.   set hilight of background button D to false
  15.   put "Question #"&group into field "Q#" -- question # option
  16.   -- get the number of card -- card # option
  17.   -- put "Question #"&it-2 into field "Q#" -- card # option
  18.   put rightone into item group of questkey
  19.   put item group of questans into foo
  20.   if foo is not empty then set hilight of background button foo to true
  21. end openCard
  22.  
  23. on closeCard
  24.   set lockScreen to true
  25.   set hilight of background button A to false
  26.   set hilight of background button B to false
  27.   set hilight of background button C to false
  28.   set hilight of background button D to false
  29.   set lockScreen to false
  30.   hide background button "Correct!"
  31. end closeCard
  32.  
  33. on idle
  34.   global time1
  35.   -- comment out next line (exit idle) if you want a time limit on test.
  36.   -- don't forget to set time limit as described in Exam button of
  37.   -- first card.
  38.   exit idle
  39.   put the seconds into time2
  40.   if time2<time1 then exit idle
  41.   if time2ΓëÑtime1 then
  42.     answer "Too much Time. Try again?" with "OK" or "Quit"
  43.   end if
  44.   if it is "OK" then
  45.     visual effect dissolve to black
  46.     visual effect iris open
  47.     go first card
  48.     openStack
  49.   else
  50.     visual effect dissolve
  51.     go home
  52.   end if
  53. end idle
  54.  
  55. on randomNext
  56.   global group,questlist
  57.   add one to group
  58.   if group > 30 then go card report
  59.   get item group of questlist
  60.   go card it
  61. end randomNext
  62.  
  63. on randomPrev
  64.   global group,questlist
  65.   subtract one from group
  66.   if group < 1 then go first card
  67.   get item group of questlist
  68.   go card it
  69. end randomPrev
  70.  
  71. on reView
  72.   global rightone, immediate
  73.   put "Correct answer is " & rightone into field review
  74.   if not immediate then
  75.     wait 3 seconds
  76.     show field review
  77.     wait until the mouseClick
  78.   else
  79.     if hilite of background button rightone is false then
  80.       show field review
  81.       wait until the mouseClick
  82.     else
  83.       -- show background button "Correct!"
  84.     end if
  85.   end if
  86. end reView
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107. -- part 1 (field)
  108. -- low flags: 01
  109. -- high flags: 0000
  110. -- rect: left=16 top=68 right=138 bottom=496
  111. -- title width / last selected line: 0
  112. -- icon id / first selected line: 0 / 0
  113. -- text alignment: 0
  114. -- font id: 3
  115. -- text size: 10
  116. -- style flags: 0
  117. -- line height: 13
  118. -- part name: Q1
  119.  
  120.  
  121. -- part 11 (field)
  122. -- low flags: 01
  123. -- high flags: 0000
  124. -- rect: left=48 top=137 right=177 bottom=499
  125. -- title width / last selected line: 0
  126. -- icon id / first selected line: 0 / 0
  127. -- text alignment: 0
  128. -- font id: 3
  129. -- text size: 10
  130. -- style flags: 0
  131. -- line height: 13
  132. -- part name: D
  133.  
  134.  
  135. -- part 25 (button)
  136. -- low flags: 00
  137. -- high flags: 2000
  138. -- rect: left=204 top=313 right=342 bottom=241
  139. -- title width / last selected line: 0
  140. -- icon id / first selected line: 902 / 902
  141. -- text alignment: 1
  142. -- font id: 0
  143. -- text size: 12
  144. -- style flags: 0
  145. -- line height: 16
  146. -- part name: Prev
  147. ----- HyperTalk script -----
  148. on mouseUp
  149.   global immediate, group, questans, refhide
  150.   if item group of questans is not empty then
  151.     if immediate then reView
  152.   end if
  153.   if refhide is false then
  154.     put true into refhide
  155.     hide field ReferenceField
  156.   end if
  157.   visual effect wipe right fast to black
  158.   visual effect wipe left
  159.   -- go to previous card
  160.   randomPrev
  161. end mouseUp
  162.  
  163.  
  164. -- part 26 (button)
  165. -- low flags: 00
  166. -- high flags: 2000
  167. -- rect: left=297 top=313 right=342 bottom=333
  168. -- title width / last selected line: 0
  169. -- icon id / first selected line: 26425 / 26425
  170. -- text alignment: 1
  171. -- font id: 0
  172. -- text size: 12
  173. -- style flags: 0
  174. -- line height: 16
  175. -- part name: Next
  176. ----- HyperTalk script -----
  177. on mouseUp
  178.   global immediate, group, questans, refhide
  179.   if item group of questans is not empty then
  180.     if immediate then reView
  181.   end if
  182.   if refhide is false then
  183.     put true into refhide
  184.     hide field ReferenceField
  185.   end if
  186.  
  187.   visual effect wipe left fast to black
  188.   visual effect wipe right fast
  189.   -- go to next card
  190.   randomNext
  191. end mouseUp
  192.  
  193.  
  194.  
  195. -- part 27 (field)
  196. -- low flags: 01
  197. -- high flags: 0000
  198. -- rect: left=48 top=178 right=219 bottom=508
  199. -- title width / last selected line: 0
  200. -- icon id / first selected line: 0 / 0
  201. -- text alignment: 0
  202. -- font id: 3
  203. -- text size: 10
  204. -- style flags: 0
  205. -- line height: 13
  206. -- part name: D
  207.  
  208.  
  209. -- part 28 (field)
  210. -- low flags: 01
  211. -- high flags: 0000
  212. -- rect: left=48 top=221 right=262 bottom=508
  213. -- title width / last selected line: 0
  214. -- icon id / first selected line: 0 / 0
  215. -- text alignment: 0
  216. -- font id: 3
  217. -- text size: 10
  218. -- style flags: 0
  219. -- line height: 13
  220. -- part name: D
  221.  
  222.  
  223. -- part 29 (field)
  224. -- low flags: 01
  225. -- high flags: 0000
  226. -- rect: left=47 top=264 right=306 bottom=502
  227. -- title width / last selected line: 0
  228. -- icon id / first selected line: 0 / 0
  229. -- text alignment: 0
  230. -- font id: 3
  231. -- text size: 10
  232. -- style flags: 0
  233. -- line height: 13
  234. -- part name: D
  235.  
  236.  
  237. -- part 20 (field)
  238. -- low flags: 01
  239. -- high flags: 0004
  240. -- rect: left=15 top=31 right=53 bottom=166
  241. -- title width / last selected line: 0
  242. -- icon id / first selected line: 0 / 0
  243. -- text alignment: 0
  244. -- font id: 0
  245. -- text size: 12
  246. -- style flags: 0
  247. -- line height: 16
  248. -- part name: Q#
  249. ----- HyperTalk script -----
  250.  
  251.  
  252.  
  253.  
  254. -- part 36 (button)
  255. -- low flags: 00
  256. -- high flags: 2000
  257. -- rect: left=368 top=305 right=342 bottom=406
  258. -- title width / last selected line: 0
  259. -- icon id / first selected line: 21700 / 21700
  260. -- text alignment: 1
  261. -- font id: 0
  262. -- text size: 12
  263. -- style flags: 0
  264. -- line height: 16
  265. -- part name: Home
  266. ----- HyperTalk script -----
  267. on mouseUp
  268.   visual effect iris close
  269.   go home
  270. end mouseUp
  271.  
  272.  
  273.  
  274.  
  275. -- part 38 (button)
  276. -- low flags: 80
  277. -- high flags: 8002
  278. -- rect: left=173 top=116 right=138 bottom=245
  279. -- title width / last selected line: 0
  280. -- icon id / first selected line: 0 / 0
  281. -- text alignment: 1
  282. -- font id: 0
  283. -- text size: 12
  284. -- style flags: 0
  285. -- line height: 16
  286. -- part name: Correct!
  287.  
  288.  
  289. -- part 39 (button)
  290. -- low flags: 00
  291. -- high flags: 8005
  292. -- rect: left=14 top=138 right=174 bottom=44
  293. -- title width / last selected line: 0
  294. -- icon id / first selected line: 0 / 0
  295. -- text alignment: 1
  296. -- font id: 0
  297. -- text size: 12
  298. -- style flags: 0
  299. -- line height: 16
  300. -- part name: A
  301. ----- HyperTalk script -----
  302. on mouseUp
  303.   global questans, group
  304.   set hilight of background button A to true
  305.   set hilight of background button B to false
  306.   set hilight of background button C to false
  307.   set hilight of background button D to false
  308.   put "A" into item group of questans
  309. end mouseUp
  310.  
  311.  
  312.  
  313. -- part 40 (button)
  314. -- low flags: 00
  315. -- high flags: 8005
  316. -- rect: left=14 top=178 right=214 bottom=44
  317. -- title width / last selected line: 0
  318. -- icon id / first selected line: 0 / 0
  319. -- text alignment: 1
  320. -- font id: 0
  321. -- text size: 12
  322. -- style flags: 0
  323. -- line height: 16
  324. -- part name: B
  325. ----- HyperTalk script -----
  326. on mouseUp
  327.   global questans, group
  328.   set hilight of background button A to false
  329.   set hilight of background button B to true
  330.   set hilight of background button C to false
  331.   set hilight of background button D to false
  332.   put "B" into item group of questans
  333. end mouseUp
  334.  
  335.  
  336.  
  337. -- part 41 (button)
  338. -- low flags: 00
  339. -- high flags: 8005
  340. -- rect: left=14 top=219 right=255 bottom=44
  341. -- title width / last selected line: 0
  342. -- icon id / first selected line: 0 / 0
  343. -- text alignment: 1
  344. -- font id: 0
  345. -- text size: 12
  346. -- style flags: 0
  347. -- line height: 16
  348. -- part name: C
  349. ----- HyperTalk script -----
  350. on mouseUp
  351.   global questans, group
  352.   set hilight of background button A to false
  353.   set hilight of background button B to false
  354.   set hilight of background button C to true
  355.   set hilight of background button D to false
  356.   put "C" into item group of questans
  357. end mouseUp
  358.  
  359.  
  360.  
  361. -- part 42 (button)
  362. -- low flags: 00
  363. -- high flags: 8005
  364. -- rect: left=14 top=264 right=300 bottom=44
  365. -- title width / last selected line: 0
  366. -- icon id / first selected line: 0 / 0
  367. -- text alignment: 1
  368. -- font id: 0
  369. -- text size: 12
  370. -- style flags: 0
  371. -- line height: 16
  372. -- part name: D
  373. ----- HyperTalk script -----
  374. on mouseUp
  375.   global questans, group
  376.   set hilight of background button A to false
  377.   set hilight of background button B to false
  378.   set hilight of background button C to false
  379.   set hilight of background button D to true
  380.   put "D" into item group of questans
  381. end mouseUp
  382.  
  383.  
  384.  
  385. -- part 43 (field)
  386. -- low flags: 81
  387. -- high flags: 0004
  388. -- rect: left=339 top=119 right=137 bottom=498
  389. -- title width / last selected line: 0
  390. -- icon id / first selected line: 0 / 0
  391. -- text alignment: 0
  392. -- font id: 3
  393. -- text size: 12
  394. -- style flags: 256
  395. -- line height: 16
  396. -- part name: review
  397.  
  398.  
  399. -- part 44 (button)
  400. -- low flags: 00
  401. -- high flags: 0000
  402. -- rect: left=460 top=24 right=62 bottom=503
  403. -- title width / last selected line: 0
  404. -- icon id / first selected line: 12119 / 12119
  405. -- text alignment: 1
  406. -- font id: 0
  407. -- text size: 12
  408. -- style flags: 0
  409. -- line height: 16
  410. -- part name: Reference
  411. ----- HyperTalk script -----
  412. on mouseUp
  413.   global refhide
  414.   if refhide is false then
  415.     put true into refhide
  416.     hide field ReferenceField
  417.   else
  418.     put false into refhide
  419.     show field ReferenceField
  420.   end if
  421.  
  422. end mouseUp
  423.  
  424.  
  425.  
  426. -- part 45 (field)
  427. -- low flags: 81
  428. -- high flags: 0004
  429. -- rect: left=188 top=32 right=54 bottom=443
  430. -- title width / last selected line: 0
  431. -- icon id / first selected line: 0 / 0
  432. -- text alignment: 0
  433. -- font id: 0
  434. -- text size: 12
  435. -- style flags: 0
  436. -- line height: 16
  437. -- part name: ReferenceField
  438.